/* gearserial_interface.h -- interface do gearserial
 *
 * Copyright (C) 2007, Diogo F. S. Ramos <diogofsr at gmail.com>
 * GEAR - Grupo de Estudos Avançados em Robótica
 * <http://www.sel.eesc.usp.br/gear>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

#ifndef GEARSERIAL_INTERFACE_H
#define GEARSERIAL_INTERFACE_H 1

#include <gtk/gtk.h>
#include "gearserial.h"


/* Enums */
enum
{
    GEARSERIAL_INTERFACE_MAIN_WINDOW,
    GEARSERIAL_INTERFACE_IMAGEMENUITEM_ABRIR_SERIAL,
    GEARSERIAL_INTERFACE_DIALOG_ABRE_SERIAL,
    GEARSERIAL_INTERFACE_ENTRY_ABRE_SERIAL,
    GEARSERIAL_INTERFACE_RADIO_BUTTON,
    GEARSERIAL_INTERFACE_BUTTON_START,
    GEARSERIAL_INTERFACE_BUTTON_STOP,
    GEARSERIAL_INTERFACE_IMAGEMENUITEM_SOBRE,
    GEARSERIAL_INTERFACE_DIALOG_ABOUT
};

/* Radio Buttons */
enum
{
    RADIO_BUTTON_300,
    RADIO_BUTTON_1200,
    RADIO_BUTTON_2400,
    RADIO_BUTTON_9600,
    RADIO_BUTTON_19200,
    RADIO_BUTTON_57600,
    RADIO_BUTTON_115200,
    RADIO_N_BUTTON
};


typedef struct _GearSerialInterface GearSerialInterface;

struct _GearSerialInterface
{
    GearSerial *gserial;
    GtkWidget *main_window;
    GtkWidget *action_area;
    GtkWidget *dialog_abre_serial;
    GtkWidget *imagemenuitem_abrir_serial;
    GtkWidget *entry_abre_serial;
    GtkWidget *radio_buttons[RADIO_N_BUTTON];
    GtkWidget *button_start;
    GtkWidget *button_stop;
    GtkWidget *imagemenuitem_sobre;
    GtkWidget *dialog_about;
    GtkWidget *checkbutton_two_stop_bits;
    GtkWidget *checkbutton_parity_bit;
    GtkWidget *checkbutton_parity_odd;
    GtkWidget *spinbutton_sleep_time;
    GtkWidget *spinbutton_many_times;
    GtkWidget *entry_byte;
};

/* Prototypes */
GearSerialInterface* gearserial_interface_new(void);
int gearserial_interface_init( GearSerialInterface *self, const char *end_glade, GearSerial *gserial );


#endif
